package text_2023_09_22;

import java.util.Scanner;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/22 09:13:47
 */
public class CountStr {
    public String T;
    public String R;
    public CountStr(String t,String r){
        this.T = t;
        this.R = r;
    }
    public int countStr(){
        int count = 0;
        String newOne = T.replace(R,"");
        count = T.length() - newOne.length();
        return count / R.length();
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String T = scanner.next();
        String R = scanner.next();
        CountStr r = new CountStr(T,R);
        System.out.println(r.countStr());
    }
}
